/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 * NuGat-API named Chameleon developed by Simon De Baets to Verimag.
 *
 */
package chameleon.model.NuGatStructure.utils;

import chameleon.gameSolver.NuGat.NuGatInterface;
import chameleon.model.NuGatStructure.NuGatStructure;
import com.sun.jna.Pointer;

/**
 * This class is a wrapper to the C struct Set.c
 *
 * @author simon
 */
public class Set extends NuGatStructure {
    
    public Set(Pointer set, NuGatInterface nugat){
        super( set, nugat);
    }
    
    /**
     * Return the first iterator for the set.
     * 
     * @return Set_Iterator_t
     */
    
    public Pointer getFirstIter(){
        return nugat_.Set_GetFirstIter(this.ptr());
    }
    
    /**
     * 
     * @param Set_Iterator_t
     * @return 
     */
    
    public boolean isEndIter(Pointer Set_Iterator_t ){
        return (Set_Iterator_t == Pointer.NULL);
    }
    
    /**
     * 
     * @param Set_Iterator_t
     * @return Set_Iterator_t
     */
    public Pointer getNextIter(Pointer Set_Iterator_t){
        return nugat_.Set_GetNextIter(Set_Iterator_t);
    }
    
    /**
     * 
     * @param Set_Iterator_t
     * @return Set_Element_t
     */
    public Pointer getMember(Pointer Set_Iterator_t){
        return nugat_.Set_GetMember(this.ptr(), Set_Iterator_t);
    }
    
    public void releaseSet(){
        nugat_.Set_ReleaseSet(this.ptr());
    }
}
